import { createRouter, createWebHashHistory } from 'vue-router';

export default createRouter({
  history: createWebHashHistory(),
  routes: [
    {
    // 主页
      path: '/',
      component: () => import('@/views/home/index.vue'),
      children: [{
        // 首页
        path: '/',
        component: () => import('@/views/home/homepage/index.vue')
      },
      // 居家
      {
        path: '/category/:id',
        name:'category',
        component: () => import('@/views/home/category/index.vue')
      }
    ]},
    {
    // 登录
      path: '/login',
      component: () => import('@/views/login/index.vue'),
    },
  ],
});
